#ifndef _SDDBPKG_HANDLE_H_
#define _SDDBPKG_HANDLE_H_

#include <sddb.h>

class ISDBaseSvrMgr
{
public:
    virtual bool Send(UINT32 dwSvrID, const char * pszBuf, UINT32 dwBufLen) = 0;
};

class ISDSvrHandler
{
public:
    virtual UINT16 GetBusinessID(void) = 0;
    virtual void ProcessPacket(UINT32 dwSvrID, const char * pszBuf, UINT32 dwBufLen) = 0;
    virtual void OnConnected(UINT32 dwSvrID) = 0;
    virtual void OnDisConnected(UINT32 dwSvrID, INT32 nErrCode) = 0;
};

class ISDSvrHandlerMgr
{
public:
    virtual bool Init(ISDBaseSvrMgr * poPipeModule) = 0;
    virtual ISDSvrHandler* GetSvrHandler(UINT8 bySvrType) = 0;
    virtual bool Run(void) = 0;
    virtual void Release(void) = 0;
};

ISDSvrHandlerMgr * SDAPI SDGetSvrHandlerMgr();

#endif